/**
 * 由 CoCo 源代码计划解包器解包
 *
 * 模块 ID：1675
 */

"use strict"

var r = require("./947")
var o = require("../1541/241")
var i = require("../1684/257")
var a = require("../1684/310")
var s = require("../1684/421")
var c = require("./1077")
var l = require("./948")
r("match", function (e, t, n) {
  return [function (t) {
    var n = s(this)
    var r = undefined == t ? undefined : t[e]
    return undefined !== r ? r.call(t, n) : new RegExp(t)[e](a(n))
  }, function (e) {
    var r = o(this)
    var s = a(e)
    var u = n(t, r, s)
    if (u.done) {
      return u.value
    }
    if (!r.global) {
      return l(r, s)
    }
    var /* [auto-meaningful-name] */r$unicode = r.unicode
    r.lastIndex = 0
    for (var p, f = [], h = 0; null !== (p = l(r, s));) {
      var m = a(p[0])
      f[h] = m
      if ("" === m) {
        r.lastIndex = c(s, i(r.lastIndex), r$unicode)
      }
      h++
    }
    return 0 === h ? null : f
  }]
})
